package com.xft.rabbitmq.rabbit.many;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author xft
 * @date 2018/3/19  11:56
 */
@Component
public class Sender2 {
    @Autowired
    private AmqpTemplate rabbitTemplate;

    public void send(int i) {
        String context = "spring boot queue" + "********" + i;
        System.out.println("Sender2:" + context);
        this.rabbitTemplate.convertAndSend("xft", context);
    }
}
